import os
import platform
import sys

from DialogController import DialogController

CURRENT_APP_PATH = sys.argv[0]
ECHATIM_DLL_NAME = ""
if platform.system() == "Windows":
    ECHATIM_DLL_NAME = "echatimsdk.dll"
elif platform.system() == "Linux":
    ECHATIM_DLL_NAME = "libechatimsdk.so"
elif platform.system() == "Darwin":
    ECHATIM_DLL_NAME = "libechatimsdk.dylib"
else:
    print("Couldn't determine running system type.")
    exit(1)


# echatimsdk dll 路径
# TEST_DLL_PATH = "C:\\Users\\Administrator\\CLionProjects\\echatim-client-cpp-core\\cmake-build-debug\\libs\\echatimsdk.dll"
# TEST_DLL_PATH = "/Users/zhiqiangdai/cmake-projects/echatim-client-cpp-core/cmake-build-debug/libs/libechatimsdk.dylib"
TEST_DLL_PATH =  CURRENT_APP_PATH[:CURRENT_APP_PATH.rindex(os.sep)] + os.sep + ECHATIM_DLL_NAME


if __name__ == "__main__":
    dialogController = DialogController()
    dialogController.init(TEST_DLL_PATH)
    dialogController.onCreate()


